<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>交换2个变量案例</title>
</head>

<body>
  <script>
    //1.定义两个变量分别存放苹果汁和橘子汁
    let apple='苹果汁'
    let orange='橘子汁'
    // 声明一个临时工
    let temp
    // 将苹果汁给领施工
      temp =apple
      // 将橘子汁给苹果
      apple=orange
      // 将临时工给橘子汁
      orange=temp
      // 输出苹果和橘子里面的饮料
      console.log(apple,orange);

  </script>
</body>

</html>